<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>修改会员卡</title>
<link rel="stylesheet" href="../layui/css/layui.css">
</head>
<body>
<!-- 添加弹出框的div -->
 <div id="addlayer" style="">
	<form class="layui-form" action="/card/doUpdate">
	    <!-- 编号 -->
		<div class="layui-form-item">	  
		    <label class="layui-form-label">卡类型ID</label>
			<div class="layui-input-inline">
		    	<input id="cardId" name='cardId' th:value="${cards.cardId}" class="layui-input" readonly="readonly">
			</div>
			<div class="layui-form-mid layui-word-aux">*此项不允许更改</div>
		</div>
		<!-- 会员卡类型 -->
		<div class="layui-form-item">
			<label class="layui-form-label">会员卡类型</label>
			<div class="layui-input-inline">
		    	<input type="text" name="cardType" id="cardType" th:value="${cards.cardType}" class="layui-input">
			</div>
			<div class="layui-form-mid layui-word-aux">*请输入会员卡类型</div>				  
    	</div>
	    <!-- 有效时间 -->
	    <div class="layui-form-item">
		    <label class="layui-form-label">有效时间</label>
			<div class="layui-input-inline">
		    	<input type="text" name="cardTime" id="cardTime" th:value="${cards.cardTime}" class="layui-input">
			</div>
			<div class="layui-form-mid layui-word-aux">*此处单位为"天"</div>
		</div>
		<!-- 有效次数 -->
		<div class="layui-form-item">
			<label class="layui-form-label">有效次数</label>
			<div class="layui-input-inline">
		    	<input type="text" name="cardFrequency" id="cardFrequency" th:value="${cards.cardFrequency}" class="layui-input">
			</div>
			<div class="layui-form-mid layui-word-aux">*0表示不限次数</div>	
	    </div>
	    <!--积分 -->
	    <div class="layui-form-item">
		    <label class="layui-form-label">积分</label>
			<div class="layui-input-inline">
		    	<input type="text" name="cardPoint" id="cardPoint" th:value="${cards.cardPoint}" class="layui-input">
			</div>
			<div class="layui-form-mid layui-word-aux">*积分数与会员卡价相同，特殊卡类型积分无限为0</div>
		</div>
		<!--价格 -->
	    <div class="layui-form-item">
			<label class="layui-form-label">价格</label>
			<div class="layui-input-inline">
		    	<input type="text" name="cardPrice" id="cardPrice" th:value="${cards.cardPrice}" class="layui-input">
			</div>
			<div class="layui-form-mid layui-word-aux">*仅供参考,只显示正价</div>
	    </div>
		<hr class="layui-bg-green">	  		      	   	    
	    <!--按钮 -->
		<div class="layui-form-item" align="center">
		  <div class="layui-input-block">
		     <input type="submit" id="addsubmit" value="提交" class="layui-btn"/>
		     <input type="reset" id="addreset" value="重置" class="layui-btn layui-btn-primary"/>
	     </div>
	   </div> 
	</form>
</div>
<script src="../layui/layui.js"></script>

<script type="text/javascript">
layui.use(['element','form','laydate'],function(){
	var element=layui.element;	//定义element对象
	var form=layui.form;		//定义form对象
	var laydate=layui.laydate;  //定义时间选择器对象
	form.render();				//渲染整个页面的form元素
});

layui.use(['layer','jquery','form','element'],function(){
	var layer=layui.layer;
	var $=layui.jquery;
	var form=layui.form;
	var element=layui.element;
	//点击提交事件
	$(document).on('click','#addsubmit',function(){
		var index = parent.layer.getFrameIndex(window.name); 
		parent.layer.close(index);
		//window.parent.location.reload(); 
	});
});
</script>
</body>
</html>